<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../css/public-bottom.css">
    <link rel="stylesheet" href="../css/bjzf.css">
    <script src="../js/公共等比缩放.js"></script>
    <link rel="stylesheet" href="../图标/iconfont.css">
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        html{
            font-size: 100px;
        }
        .header{
            width: 100vw;
            height: 0.5rem;
            background-color: #ff8a00;
            display: flex;
        }
        .logos{
            flex: 1;
            display: flex;
        }
        .logo{
            width: 1.5rem;
            height: 0.45rem;
            margin: 0.04rem auto;
        }
        .mys{
            flex: 1;
            display: flex;
        }
       .my,.xiazai{
           width: 0.3rem;
           height: 0.35rem;
          margin-top:0.08rem ;
       }
       .my{
        margin-left:0.6rem ;
       }
       .xiazai{
        margin-left:0.3rem ;
       }
       .my1,.xiazai1{
           display: flex;
       }
    </style>
</head>

<body>
    <div class="all">
        <div>
            <header>
                <div class="header">
                    <div class="logos"> 
                        <img src="../img2/logo.jpg" class="logo">
                    </div>
                   <div class="mys">
                       <a href="#" class="my1"><img src="../img2/my.jpg" class="my"></a>
                       <a href="#" class="xiazai1"><img src="../img2/xiazai.jpg" class="xiazai"></a>
                     </div>
                </div>
            </header>
        </div>
        <!-- 头部导航栏：整个页面第二行 -->
        <div class="na">
            <a href="#" class="sy">首页</a> > <a href="#" class="bjzf">北京租房</a> 
        </div>
        <div class="headers">
            <div class="headers-1">
               <form action="">
                   <input type='search' >
               </form>
              <span>|</span> 
               <img src="../img2/search_03.png" alt="">
            </div>
    </div>
    <!--  主体导航栏：整个页面第四行 -->
       <ul class="nav">
           <li class="nav-li" data-num="0"> <span class="span1">区域</span>  <span class="iconfont icon-sanjiaoxia"></span><span class="iconfont icon-sanjiaoshang"></span>  </li>
           <li class="nav-li" data-num="1"> <span class="span1">价格</span>  <span class="iconfont icon-sanjiaoxia"></span><span class="iconfont icon-sanjiaoshang"></span>  </li>
           <li class="nav-li" data-num="2"> <span class="span1">房型</span>  <span class="iconfont icon-sanjiaoxia"></span><span class="iconfont icon-sanjiaoshang"></span>  </li>
           <li class="nav-li" data-num="3"> <span class="span1">更多</span>  <span class="iconfont icon-sanjiaoxia"></span><span class="iconfont icon-sanjiaoshang"></span>  </li>
       </ul>
        <div class="main">
            <div>
                <ul>
                    <li>
                        <div class="li-div1"><img src="../img2/img1.png" alt=""></div>
                        <div class="li-div2">
                            <div>
                                <h2>光华部中间 一层带...</h2>
                                <p>2室1厅96m²南北  </p>
                                <p>青岛新天地  </p>
                                <p> <span>集中供暖</span>  <span>1322万</span></p>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="li-div1"><img src="../img2/img2.png" alt=""></div>
                        <div class="li-div2">
                            <div>
                                <h2>光华部中间 一层带...</h2>
                                <p>2室1厅96m²南北  </p>
                                <p>青岛新天地  </p>
                                <p> <span>集中供暖</span>  <span>1322万</span></p>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="li-div1"><img src="../img2/img3.png" alt=""></div>
                        <div class="li-div2">
                            <div>
                                <h2>光华部中间 一层带...</h2>
                                <p>2室1厅96m²南北  </p>
                                <p>青岛新天地  </p>
                                <p> <span>集中供暖</span>  <span>1322万</span></p>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="li-div1"><img src="../img2/img1.png" alt=""></div>
                        <div class="li-div2">
                            <div>
                                <h2>光华部中间 一层带...</h2>
                                <p>2室1厅96m²南北  </p>
                                <p>青岛新天地  </p>
                                <p> <span>集中供暖</span>  <span>1322万</span></p>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="li-div1"><img src="../img2/img2.png" alt=""></div>
                        <div class="li-div2">
                            <div>
                                <h2>光华部中间 一层带...</h2>
                                <p>2室1厅96m²南北  </p>
                                <p>青岛新天地  </p>
                                <p> <span>集中供暖</span>  <span>1322万</span></p>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="bottom">
            <div>北京找房无忧网>首页</div>
            <div> 
                <div class="bottom-left"> 
                    <div></div>
                    <div>
                        <img src="../img2/apple.png" alt="">
                        <div class="apple-right"> iphone 客户端</div>
                    </div>
                   
                </div>
                <div class="bottom-right"> 
                    <div>
                        <img src="../img2/android.png" alt="">
                        <div class="android-right"> android 客户端</div>
                    </div>
                    <div></div>
               </div>
             </div>
             <div>北京找房无忧房地产经纪有限公司</div>
             <div> 网络经许可证京ICP备20160812号-12</div>
        </div>
    </div>
</body>
    <script>
        var ul_ = document.getElementsByClassName('nav')[0];
        var li_ = document.getElementsByClassName('nav-li');
        var span1_ = document.getElementsByClassName('span1');
        // console.log(span1_);
        var icon1_ = document.getElementsByClassName('icon-sanjiaoxia');
        var icon2_ = document.getElementsByClassName('icon-sanjiaoshang');
       //js事件委托
        ul_.ontouchstart = function(){
        for(var i = 0;i<li_.length;i++){
            span1_[i].style.color = 'black';
            icon1_[i].style.display = 'inline-block';
             icon2_[i].style.display = 'none';
        }
        var e = event || window.event;
        // console.log(e);
        //点击对应的事件 相当于this用法
        var this_ = e.path[1]; //对应的li
        var num_ = this_.getAttribute('data-num');
        console.log(num_);
        this_.style.color='#FFC741';
        span1_[num_].style.color = '#FFC741';
        icon1_[num_].style.display = 'none';
        icon2_[num_].style.display = 'inline-block';
       }
        
       
    </script>
</html>